// 导入axios实例
import instance from "@/utils/http";

// 增
export const addGangweiAPI = (data) => {
    return instance({
        method: 'POST',
        url: '/gangwei',
        data: data
    })
}

// 删
export const delGangweiAPI = (id) => {
    return instance({
        method: 'DELETE',
        url: '/gangwei/' + id // http://localhost:3000/gangwei/2
    })
}

// 改
export const updateGangweiAPI = (id, data) => {
    return instance({
        method: 'PUT',
        url: '/gangwei/' + id,
        data: data
    })
}

// 查
export const getGangweiAPI = (params) => {
    return instance({
        method: 'GET',
        url: '/gangwei',
        params: params
    })
}
